{include file="public/header" /}




<div class="page">
	<div class="fixed-bar">
		<div class="item-title">
			<div class="subject">
				<h3>投诉管理</h3>
				<h5></h5>
			</div>
			{include file="public/admin_items" /}
		</div>
	</div>

	<div class="fixed-empty"></div>

	<form method="get" name="formSearch">
		<div class="sc-search-form">
			<dl>
				<dt>投诉人</dt>
				<dd><input class="txt" type="text" name="member_name" id="member_name" value="{present name="member_name"}{$member_name}{/present}" /></dd>
			</dl>
			<dl>
				<dt>投诉内容</dt>
				<dd><input class="txt" type="text" name="consult_content" id="consult_content" value="{present name="consult_content"}{$consult_content}{/present}" /></dd>
			</dl>

			<dl>
				<dt></dt>
				<dd></dd>
			</dl>
			<div class="btn_group">
				<a href="javascript:document.formSearch.submit();" class="btn " title="{$Think.lang.sc_query}">{$Think.lang.sc_query}</a>

				<!--<a href="{:url('Complaint/index')}" class="btn btn-default" title="{$Think.lang.sc_cancel}">{$Think.lang.sc_cancel}</a>-->

			</div>
		</div>
	</form>


	<div class="explanation" id="explanation">
		<div class="title" id="checkZoom">
			<h4 title="{$Think.lang.sc_explanation_tip}">{$Think.lang.sc_explanation}</h4>
			<span id="explanationZoom" title="{$Think.lang.sc_explanation_close}" class="arrow"></span>
		</div>
		<ul>
			<li>会员可在订单页对商品订单进行投诉</li>
		</ul>
	</div>


	<table class="sc-default-table">
		<tbody>
		{notempty name="order_code"}
		{foreach name="order_code" item="consult"}
		<tr class="space">
			<th class="w24"><input type="checkbox" class="checkitem" name="consult_id[]" value="{$consult.order_info.complaint_id}" /></th>
			<th>
				<strong>投诉订单:&nbsp{$consult.order_info.order_sn}</strong>
			</th>
			<th><strong>{$Think.lang.sc_handle}:</strong>&nbsp;
				<a href="javascript:scLayerConfirm('{:url('Complaint/delete',['complaint_id'=>$consult.order_info.complaint_id])}','{$Think.lang.sc_ensure_del}')" class="dsui-btn-del"><i class="fa"></i>{$Think.lang.sc_del}</a>
				|
				<a href="javascript:scLayerOpen('{:url('Complaint/reply_consult',['complaint_id'=>$consult.order_info.complaint_id])}','回复咨询')" class="dsui-btn-edit"><i class="fa"></i>回复投诉</a>
			</th>
		</tr>
		<tr>
			<td colspan="12">
				<fieldset style="border: 1px dashed #E7E7E7;padding: 0.5em;">
					<legend>
                            <span><strong>投诉人:</strong>&nbsp;
                                {empty name="consult.order_info.member_id"}
                                {$Think.lang.consulting_index_guest}
                                {else /}
                                {$consult.order_info.member_name}
                                {/empty}
                            </span>
						&nbsp;&nbsp;&nbsp;&nbsp;
						<span><strong>投诉时间:</strong>&nbsp;{$consult.order_info.consult_addtime|date="Y-m-d H:i:s",###}</span>
					</legend>
					<div class="formelement" id="hutia_{$key}">{$consult.order_info.consult_content}</div>
				</fieldset>
				<!--<fieldset style="background: none repeat scroll 0 0 #FFFAE3;padding: 0.5em;border: 1px dashed #F1E38B;">-->
					<!--<legend><strong>{$Think.lang.consulting_index_reply}:</strong></legend>-->
					<!--<div class="formelement" id="hutia2_{$key}">-->
						<!--{notempty name="consult.consult_reply"}-->
						<!--{$consult.consult_reply}-->
						<!--{else /}-->
						<!--{$Think.lang.consulting_index_no_reply}-->
						<!--{/notempty}-->
					<!--</div>-->
				<!--</fieldset>-->
			</td>
		</tr>
		{/foreach}
		{else /}
		<tr class="no_data">
			<td colspan="20">{$Think.lang.sc_no_record}</td>
		</tr>
		{/notempty}
		</tbody>
		<tfoot>
		{notempty name="consult_list"}
		<tr class="tfoot">
			<td><input type="checkbox" class="checkall" id="checkallBottom"></td>
			<td colspan="16"><label for="checkallBottom">{$Think.lang.sc_select_all}</label>
				&nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn btn-small" onclick="submit_delete_batch()"><span>{$Think.lang.sc_del}</span></a>
				{$show_page}
			</td>
		</tr>
		{/notempty}
		</tfoot>
	</table>


</div>

<script type="text/javascript">

	function submit_delete(ids_str) {
		_uri = ADMINSITEURL + "/Complaint/delete.html?complaint_id=" + ids_str;
		scLayerConfirm(_uri, '{$Think.lang.sc_ensure_del}');
	}

</script>